package com.zx.web.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.base.web.common.BaseRepository;
import com.base.web.common.impl.BaseServiceImpl;
import com.zx.web.entity.Ecr;
import com.zx.web.repository.EcrRepository;
import com.zx.web.service.IEcrService;

/**
 * Service：ECR表.
 * @author Ken
 * @since 2017-04-23 22:41
 * @version v1.0.0
 */
@Service
@Transactional
public class EcrService extends BaseServiceImpl<Ecr, String> implements IEcrService {

    @Autowired
    private EcrRepository ecrRepository;

    @Override
    public BaseRepository<Ecr, String> geBaseRepository() {
        return ecrRepository;
    }

    /**
     * 根据编号查询单个对象
     */
    @Override
    @Transactional(readOnly = true)
    public Ecr findOne(String id) {
        return ecrRepository.findOne(id);
    }

    /**
     * 根据编号列表查询对象列表
     * @param ids 编号列表（逻辑主键）
     */
    @Override
    @Transactional(readOnly = true)
    public List<Ecr> findList(List<String> ids) {
        return ecrRepository.findList(ids);
    }

    /**
     * 根据编号逻辑删除
     * @param id （逻辑主键）
     */
    @Override
    public void delete(String id) {
        ecrRepository.delete(id);
    }

}
